home *** CD-ROM | disk | FTP | other *** search
- Path: news1.interserv.net!news
- From: <dvisage@interserv.com>
- Newsgroups: comp.lang.c++
- Subject: typedef and complex types
- Date: 11 Feb 1996 22:09:48 GMT
- Organization: InterServ News Service
- Message-ID: <4flpfc$101@lal.interserv.net>
- NNTP-Posting-Host: dd06-002.compuserve.com
- Content-Type: text/plain
- Content-length: 835
- X-Newsreader: AIR Mosaic (32-bit) 4.00
-
-
- > static void call_thru (int argc, char *argv[]);
- >
- > PFV netx_entry_point = call_thru;
- >
- >(Note: they are not all just (int, char**)).
- >
- >I have gone through most of the code and removed the declarations
- >involving PFV and replaced with something like:
- >
- > void (*netx_entry_point(int, char**) = call_thru;
- >
- >I would like to know if there is a more elegant or perhaps just plain
- >better way to handle this that is not obvious to me.
- >
- >Thanks,
- >
- If they are not all just (int, char**), then perhaps more than one typedef
- is called for. For the ones that are really PFV types, you can change the
- typedef to look like this :
-
- typedef void (*PFV)(int, char**);
-
- and then most of your assigments will work. For those that do not have
- this type of parameter list, break down and create more typedefs.
-
-
-
-